Skip to content

Remove unnecessary busy threads reading from processes stdout/stderr#1672

Draft
ansys-akarcher wants to merge 1 commit intomainfrom
maint/remove_busy_io_threads
Draft

Remove unnecessary busy threads reading from processes stdout/stderr#1672
ansys-akarcher wants to merge 1 commit intomainfrom
maint/remove_busy_io_threads

Conversation

@ansys-akarcher
Copy link
Copy Markdown
Contributor

this PR does not fix anything in particular.

From looking at the code it seems like, when a gRPC server is created, two threads will be started until the server dies, especially if the server startup is successful.

I think the behavior can be kept without the existence of these two threads, as the general approach is: block until the server startup is successful, or an error is detected, or server has not started and time has ran out.

Current modification do not work with server within docker context.


# Detect when server is started
if stdout_line != None and "server started" in stdout_line:
started = True
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ansys-akarcher shouldn't we also break?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I was wondering about that also

I don't know if it would be possible to have "server started" and some stderr output

in this case the behavior would be different (breaking would wrongly set started as True, skipping any errors)

@PProfizi
Copy link
Copy Markdown
Contributor

Hi @ansys-akarcher is this still ongoing work?

@ansys-akarcher
Copy link
Copy Markdown
Contributor Author

@PProfizi the changes were insufficient, as there was also the docker context to take into account.

But yeah I'd like to complete these changes at some point

@PProfizi PProfizi changed the base branch from master to main July 28, 2025 09:54
@pyansys-automation
Copy link
Copy Markdown
Contributor

Hello @PProfizi!
This issue has been open for over a year and has had no updates in the past 8 months. If it is still relevant, please provide an update. Otherwise, consider closing it to help keep the issue tracker clean.

If this issue needs to remain open, please comment below with @pyansys-automation never close issue to prevent it from being automatically closed.

If you want this repository to be excluded from this automated maintenance process, please let us know by filling in the opt-out request form.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants